{include file="include:header" /}
<body class="fixed-sidebar full-height-layout gray-bg" >
    <!-- 导航 -->
    <div class="row wrapper border-bottom white-bg page-heading order-list">
        <div class="col-sm-4">
            <h2>订单列表</h2>
            <ol class="breadcrumb">
                <li><a href="{:url('admin/Index/home')}">主页</a></li>
                <li><a href="#">订单与服务</a></li>
                <li><strong>订单列表</strong></li>
            </ol>
        </div>

    </div>
    <!-- 内容 -->
   <div class="wrapper wrapper-content">
        <div class="row">
            <!-- 搜索部分 -->
            <div class="col-sm-6">
                <div class="panel panel-default" >
                    <div class="panel-heading">快速查询</div>
                    <div class="panel-body">
                        <form class="form-horizontal search-form" action="" method="get" id="transmit">
                            <div class="form-group">
                                <label class="col-xs-2 control-label">用户手机号</label>
                                <div class="col-xs-10 ">
                                    <input type="text" class="form-control" name="uid" value="{$post['uid']?$post['uid']:''}" placeholder="用户手机号">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-xs-2  control-label">产品类型</label>
                                <div class="col-xs-10 ">
                                    <select class="form-control m-b" name="o_type_id">
                                        <option value="">全部</option>
                                        {if condition="$post['o_type_id'] eq ''"}
                                            <option value="1">法律顾问</option>
                                            <option value="2">律师函</option>
                                            <option value="3">股权架构设计</option>
                                            <option value="4">股权激励方案</option>
                                            <option value="5">投融资顾问</option>
                                            <option value="6">企业劳动风险防范专项套餐</option>
                                            <option value="7">教你打官司</option>

                                        {else /}
                                                <option value="1" {eq name="$post['o_type_id']" value="1" }selected="selected" {/eq}>法律顾问</option>
                                                <option value="2" {eq name="$post['o_type_id']" value="2" }selected="selected" {/eq}>律师函</option>
                                            <option value="3" {eq name="$post['o_type_id']" value="3" }selected="selected" {/eq}>股权架构设计</option>
                                            <option value="4" {eq name="$post['o_type_id']" value="4" }selected="selected" {/eq}>股权激励方案</option>
                                            <option value="5" {eq name="$post['o_type_id']" value="5" }selected="selected" {/eq}>投融资顾问</option>
                                            <option value="6" {eq name="$post['o_type_id']" value="6" }selected="selected" {/eq}>企业劳动风险防范专项套餐</option>
                                            <option value="7" {eq name="$post['o_type_id']" value="7" }selected="selected" {/eq}>教你打官司</option>

                                        {/if}

                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-xs-2  control-label">订单状态</label>
                                <div class="col-xs-10 ">
                                    <select class="form-control m-b" name="o_state">
                                        <option value="">全部</option>
                                        {if condition="$post['o_state'] eq ''"}
                                        <option value="1">待付款</option>
                                        <option value="2">已支付</option>
                                        <option value="3">已服务</option>
                                        <option value="4">已取消</option>
                                        <option value="5">已转账申请审核</option>
                                        {else /}
                                        <option value="1" {eq name="$post['o_state']" value="1" }selected="selected" {/eq}>待付款</option>
                                        <option value="2" {eq name="$post['o_state']" value="2" }selected="selected" {/eq}>已支付</option>
                                        <option value="3" {eq name="$post['o_state']" value="3" }selected="selected" {/eq}>已服务</option>
                                        <option value="4" {eq name="$post['o_state']" value="4" }selected="selected" {/eq}>已取消</option>
                                        <option value="5" {eq name="$post['o_state']" value="5" }selected="selected" {/eq}>已转账申请审核</option>
                                        {/if}

                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-xs-2 control-label">下单时间</label>
                                <div class="col-xs-10 ">
                                    <input  type="text" name="stime"  size="18" value="{$post.stime?$post.stime:''}" placeholder="开始" class=" form-control scinput" style="width: 140px;" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" />&nbsp;&nbsp;
                                    <br/><input type="text" name="otime" size="18" value="{$post.otime?$post.otime:''}" placeholder="结束" class=" form-control scinput" style="width: 140px;" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" />
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <a href="javascript:;" ><input type="button" value="搜索" class="search-btn mg-right-10 col-xs-offset-4 btn btn-primary consult-search" /></a>
                            &nbsp;&nbsp;
                            <a href="javascript:;" class="btn btn-outline btn-default order-tabale">导出表格</a>
                        </form>
                    </div>
                </div>
            </div>
            
        </div>
            <table class="table table-bordered white-bg">
                <thead>
                    <tr>
                        <th>订单号</th>
                        <th>用户昵称</th>
                        <th>产品名称</th>
                        <th>订单金额</th>
                        <th>订单状态</th>
                        <th>下单与支付时间</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                   {volist name="list" id="v"}
                   <tr>
                        <td>{$v['o_no']}</td>
                        <td><span class="btn btn-xs btn-primary">{$v['u_nickname']?$v['u_nickname']:$v['u_phone']}</span></td>
                        <td>

                            {$v['o_type_id']|product_name}
                        </td>
                        <td><font color="red">{$v['o_money']}</font></td>
                        <td>
                            {if condition="$v['o_state'] eq 1"}<span class="btn btn-xs  btn-danger">待付款
                            {elseif condition="$v['o_state'] eq 2"/}<span class="btn btn-xs btn-success">已支付
                            {elseif condition="$v['o_state'] eq 3"/}<span class="btn btn-xs btn-primary">已服务
                            {elseif condition="$v['o_state'] eq 4"}<span class="btn btn-xs btn-link">已取消
                            {else/}
                                        <span class="btn btn-xs  btn-danger">已转账申请审核
                            {/if}
                           </span>
                        </td>
                        <td>下单：<font color="red">{$v['o_addtime']}</font><br/>支付：
                            {neq name="$v['o_paytime']" value="0000-00-00 00:00:00"}<font color="blue">{$v['o_paytime']}</font>{/neq}
                        </td>
                        <td>
                            <a class="btn-primary btn-xs btn btn-outline" href="{:url('admin/Order/order_details',array('order_id'=>$v['order_id']))}">查看详情</a>
						</td>
                    </tr> 
                 {/volist}
                </tbody>
            </table>
            <div class="btn-group">{$page}</div>
    </div>
</body>
</html>
{include file="include:js" /}
